﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using log4net;

namespace OrchardFork.Framework
{
    /// <summary>
    /// Base interface for services that are instantiated per unit of work (i.e. web request).
    /// </summary>
    public interface IDependency
    {
    }

    /// <summary>
    /// Base interface for services that are instantiated per shell/tenant.
    /// </summary>
    public interface ISingletonDependency : IDependency
    {
    }

    /// <summary>
    /// Base interface for services that may *only* be instantiated in a unit of work.
    /// This interface is used to guarantee they are not accidentally referenced by a singleton dependency.
    /// </summary>
    public interface IUnitOfWorkDependency : IDependency
    {
    }

    /// <summary>
    /// Base interface for services that are instantiated per usage.
    /// </summary>
    public interface ITransientDependency : IDependency
    {
    }


    public abstract class Component : IDependency
    {
        protected Component()
        {
            Logger = log4net.LogManager.GetLogger(GetType());
            //  T = NullLocalizer.Instance;
        }

        public ILog Logger { get; set; }
        // public Localizer T { get; set; }
    }
}
